<!DOCTYPE html>
<html>
<head>
<meta content="telephone=no" name="format-detection">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="zh-CN">
<meta http-equiv="x-ua-compatible" content="IE=edge, chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<meta name="keywords" content="关键词" />
<meta name="description" content="页面简介" />
<link rel="icon" href="favicon.ico" />
<link rel="shortcut icon" href="favicon.ico" />
<link href="../csaa/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../csaa/fonts/iconfont/iconfont.css">
<link rel="stylesheet" href="../csaa/fonts/materialicons/material-icons.css">

<script language="javascript" type="text/javascript" src="../csaa/js/jquery.min.js"></script>
<script src="../csaa/js/httpPath.js"></script>
<script src="../csaa/js/httpUtils.js"></script>
<script language="javascript" type="text/javascript" src="../csaa/js/site.js"></script>
<title>全国青少年航空科学素质等级考试</title>
</head>
<body id="manage" style="min-height: 1288px;">
	<div id="loader" class="hide"></div>

<!-- 头部 开始 -->
<header id="m_header" class="m_navbar m_header">
	<div class="container-fluid">
	  <div class="navbar-header">
		<a class="navbar-brand" href="../index.html" style="background-image: url(../csaa/img/logo_blue.png);"></a>
		<span>全国青少年无人机科学素质等级考试</span>
	  </div>


		<div class="header_login">
			<a class="item username" href="./usercenter.html" style="display:none">丁培培</a>
			<a class="item signout" style="display:none; ">退出</a>
			<a class="item back_web btn btn_color_1" href="../index.html">返回官网</a>
		</div>

	</div>
  </header>
<!-- 头部 结束 -->


<!-- 侧边栏 -->
<div id="siderbar">
	<div class="box">
		<a href="./usercenter.html" class="list-group-item " title="考点等级"><i class="material-icons">&#xe31a;</i><span>考点等级</span></a>
		<a href="./usercenter_home.html" class="list-group-item " title="账号中心"><i class="material-icons">&#xe80b;</i><span>账号中心</span></a>
	</div>
</div>
<!-- 侧边栏 -->

<!-- 主体 开始 -->
<div id="content">
	<div class="content_box">
		<div class="dengji card">
			<div class="dengji_item">
				<div class="label">考点名称</div>
				<div class="text name">上海市航宇中心</div>
			</div>
			<div class="dengji_item">
				<div class="label">当前等级</div>
				<div class="text level">中级</div>
			</div>
			<div class="dengji_item">
				<div class="label">考点有效期</div>
				<div class="text time">2020-10-20</div>
			</div>
			<div class="dengji_item">
				<div class="label">操作</div>
				<div class="text btn btn_color_1" style="padding: 0 10px; line-height: 35px;">认证续期</div>
			</div>
		</div>
		<div class="dengji_news card">
			<div class="djnews_item">
				<div class="label">全国青少年无人机等级认证考试</div>
				<div class="text time">11-20</div>
			</div>

		</div>
		<div class="dengji_fool card">
			<div class="djfool_item btn_color_1 btn">申报初级考点</div>
			<div class="djfool_item btn_color_1 btn">申报中级考点</div>
			<div class="djfool_item btn_color_1 btn">申报高级考点</div>
			<div class="djfool_item btn_color_1 btn">申报特级考点</div>
			<div class="djfool_item btn_color_2 btn">申报历史</div>
		</div>


	</div>


</div>
<!-- 主体 结束 -->

<script>
	fun_islogin(true);//页面头部登录
	var params = {
		"token": localStorage.getItem("token"),
        "userId": localStorage.getItem("userId")
	};
	$.ajax({
		url: GET_getinfo,
		data: params,
		type: "GET",
		dataType: "JSON",
		success: function (data, textStatus) {
			if( typeof data != "object" ) {
				data = JSON.parse(data);
			}

			if (data.status == 1) {
				var fetch_data = data.data;
				$(".name").text( fetch_data.companyName );
				if( fetch_data.level == 0 ){
					$(".level").text( "无等级" );
				} if( fetch_data.level == 1 ){
					$(".level").text( "初级" );
				} if( fetch_data.level == 2 ){
					$(".level").text( "中级" );
				} if( fetch_data.level == 3 ){
					$(".level").text( "高级" );
				} if( fetch_data.level == 4 ){
					$(".level").text( "特级" );
				}


				function formatDate(now) {
                    var year=now.getFullYear();  //取得4位数的年份
                    var month=now.getMonth()+1;  //取得日期中的月份，其中0表示1月，11表示12月
                    var date=now.getDate();      //返回日期月份中的天数（1到31）
                    var hour=now.getHours();     //返回日期中的小时数（0到23）
                    var minute=now.getMinutes(); //返回日期中的分钟数（0到59）
                    var second=now.getSeconds(); //返回日期中的秒数（0到59）
                    return year+"-"+month+"-"+date;
                }
                var g=fetch_data.endTime; //定义一个时间戳变量
                var d=new Date(g);   //创建一个指定的日期对象
				$(".time").text( "截止 "+ formatDate(d) );

			} else {
				$.fn.poptips(data.msg);
			}
		},
		error: function (xhr, textStatus, errorThrown) {
			$.fn.poptips("连接超时，请检查您的网络");
		}
	});
</script>
</body>
</html>











